#ifndef __CONTACTBUTTON_H__
#define __CONTACTBUTTON_H__

#include <wx/wx.h>
#include "mainwindow.h"

class ScrolledWidgetsPane;

class ContactButton:public wxPanel{

private:
    bool pressedDown;
    wxString nickname;
    bool color;

    static const int buttonWidth = 200;
    static const int buttonHeight = 50;

    ScrolledWidgetsPane* getParent();

    DECLARE_EVENT_TABLE();

public:
    ContactButton(ScrolledWidgetsPane* parent, wxString text);

    void paintEvent(wxPaintEvent & evt);
    void paintNow(ContactButton* btn, bool doubleclick = false, bool uncheck = false);
    void redraw(wxString nickname);

    void mouseMoved(wxMouseEvent& event);
    void mouseDown(wxMouseEvent& event);
    void mouseWheelMoved(wxMouseEvent& event);
    void mouseReleased(wxMouseEvent& event);
    void rightClick(wxMouseEvent& event);
    void mouseLeftWindow(wxMouseEvent& event);
    void keyPressed(wxKeyEvent& event);
    void keyReleased(wxKeyEvent& event);
    void doubleClick(wxMouseEvent& event);
};

#endif //__CONTACTBUTTON_H__
